package group.systemdesign.Controller;

import group.systemdesign.Pojo.Video;
import group.systemdesign.Service.VideoService;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class VideoController {
    @Autowired
    private VideoService videoService;
    @GetMapping("likesRecommend")
    private List<Video> likesRecommend(){
        return videoService.likesRecommend();
    }
    @GetMapping("likesMusic")
    private List<Video> likesMusic(){
        return videoService.likesMusic();
    }
    @GetMapping("likesGame")
    private List<Video> likesGame(){
        return videoService.likesGame();
    }
    @GetMapping("likesComic")
    private List<Video> likesComic(){
        return videoService.likesComic();
    }
    @GetMapping("likesSports")
    private List<Video> likesSports(){
        return videoService.likesSports();
    }
    @GetMapping("viewsMusic")
    private List<Video> viewsMusic(){
        return videoService.viewsMusic();
    }
    @GetMapping("viewsGame")
    private List<Video> viewsGame(){
        return videoService.viewsGame();
    }
    @GetMapping("viewsComic")
    private List<Video> viewsComic(){
        return videoService.viewsComic();
    }
    @GetMapping("viewsSports")
    private List<Video> viewsSports(){
        return videoService.viewsSports();
    }
    @GetMapping("viewsRecommend")
    private List<Video> viewsRecommend(){
        return videoService.viewsRecommend();
    }
    @GetMapping("searchByName")
    private List<Video> searchByName(String video_name){
        return videoService.searchByName(video_name);
    }
    @GetMapping("history")
    private List<Video> history(){
        return videoService.history();
    }
    @GetMapping("addHistory")
    private Video addHistory(Integer id){
        return videoService.addHistory(id);
    }
    @GetMapping("collection")
    private List<Video> collection(){
        return videoService.collection();
    }
    @GetMapping("addCollection")
    private Video addCollection(Integer id){
        return videoService.addCollection(id);
    }
}
